################################################################################
# 2d flow around porous media
#
# Note:
#  - The "comm/sort” option to the “global” command is used to match MPI runs.
#  - The “twopass” option is used to match Kokkos runs.
# The "comm/sort" and "twopass" options should not be used for production runs.
################################################################################

seed	    	    12345
dimension   	    2
global              gridcut 0.0 comm/sort yes

boundary	    o r p

create_box  	    0 150 0 150 -0.5 0.5
create_grid 	    150 150 1 

balance_grid        rcb cell

global		    nrho 1.0 fnum 0.01

species		    air.species N O
mixture		    air N O vstream 100.0 0 0 

region              inner block 25.5 124.5 25.5 124.5 INF INF
group               inner grid region inner one

compute             COMP isurf/grid all all n
fix                 FIX ave/grid all 10 10 100 c_COMP[*]
fix                 ablate ablate inner 100 0.2 f_FIX

global              surfs implicit
read_isurf          inner 100 100 1 binary.101x101 180.5 ablate

surf_collide	    1 diffuse 300.0 1.0
surf_modify         all collide 1

collide             vss air air.vss

fix		    in emit/face air xlo twopass

fix                 check grid/check 1 error

timestep 	    0.0001

#dump                2 image all 100 image.*.ppm type type pdiam 0.05 &
#                    size 1024 1024 zoom 1.75 grid proc sline yes 0.005 &
#                    # surf proc 0.004 
#dump_modify	    2 pad 5

fix                 bal balance 100 1.001 rcb part

stats		    100
stats_style	    step cpu np nattempt ncoll nscoll nscheck &
                    f_bal f_bal[2] f_ablate

# run 10-20x longer for a better movie

run                 500
